package com.vecspace.scheduler.job;

import java.util.Date;

import com.vecspace.web.servlet.model.Path;

/**例子。用于测试 
 * @version: 1.0
 * @author: wanghua
 */
@Path("sampleJob")
public class SapmleJob extends AbstractJob{
	int process = 0;
	@Override
	public boolean execute(String args) {
		System.out.println("SapmleJob开始执行, at:" + new Date().toString());
		for(int i=0; i< 100; i++) {			
			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			process = i+1;
		}
		System.out.println("SapmleJob执行结束, at:" + new Date().toString());
		return true;
	}

	@Override
	public String getJobName() {
		return "A Sapmle Job";
	}

	@Override
	public int getProgress() {
		return process;
	}
	
}
